package com.pig.graduate.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.util.Date;


@Data
public class BaseEntity {

    /**
     * ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 创建时间
     */
    @JsonSerialize(using=CustomDateTimeSerializer.class)
    @JsonFormat(shape = JsonFormat.Shape.STRING ,pattern ="yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 更新时间
     */
    @JsonSerialize(using=CustomDateTimeSerializer.class)
    @JsonFormat(shape = JsonFormat.Shape.STRING ,pattern ="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 备注
     */
    private String remark;

    /**
     * 当前页
     */
    @TableField(exist = false)
    private Integer pageNum;

    /**
     * 当前页数量
     */
    @TableField(exist = false)
    private Integer pageSize = 20;

}
